<?php
namespace app\yunda\model;

use think\Model;
use traits\model\SoftDelete;

/**
 * 用户地址表
 * @package app\yunda\model
 */
class Address extends Model
{
    use SoftDelete;
    protected $table = 'dp_yd_address';
    protected $autoWriteTimestamp = true;

    //获取地址
    public function getAddress($id=null)
    {
        if($id===null) return '参数错误';
        $row=$this->field('name,phone,home_1,address,type,is_default')->find($id);
        return $row;
    }
}
